package com.jxc.admin.config.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.WebFault;
import java.io.IOException;

@WebFilter(urlPatterns = {"/d","/*"},filterName = "encodingFilter")
public class EncodingFilter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
                         FilterChain filterChain) throws IOException, ServletException {
        //设置浏览器接受参数的响应编码
        servletResponse.setContentType("text/html;charset=UTf-8");
        filterChain.doFilter(servletRequest,servletResponse);
    }
}
